﻿@model IEnumerable<VehicleManagement.Models.MemoryBook>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("添加待办事记", "CreateMemoryRecord")
</p>
<table>
    <tr>
        <th>
            MemRecordID
        </th>
        <th>
            UserID
        </th>
        <th>
            UserRole
        </th>
        <th>
            RecordContent
        </th>
        <th>
            RecordTime
        </th>
        <th>
            WarnTime
        </th>
        <th>
            IsComplish
        </th>
        <th>
            Remark
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.MemRecordID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserRole)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RecordContent)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RecordTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.WarnTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsComplish)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Remark)
        </td>
        <td>
            @Html.ActionLink("Edit", "EditMemoryRecord", new { id=item.MemRecordID }) |
            @Html.ActionLink("Details", "DetailsMemoryRecord", new { id=item.MemRecordID }) |
            <a href="javascript:void(0)" onclick="DeleteMemoryRecord(@item.MemRecordID)">删除</a>
        </td>
    </tr>
}

</table>
